import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/stm/swsttickethand/line/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/stm/swsttickethand/line',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/stm/swsttickethand/line/' + id,
    method: 'get'
  })
}

export function putObj(obj) {
  return request({
    url: '/stm/swsttickethand/line',
    method: 'put',
    data: obj
  })
}

export function getDetailObj(id) {
  return request({
    url: '/stm/swsttickethand/line/getDetailById/' + id,
    method: 'get'
  })
}

export function inform(obj) {
  return request({
    url: '/stm/swsttickethand/line/inform',
    method: 'post',
    data: obj
  })
}

export function confirmOrFeedBack(obj){
  return request({
    url: '/stm/swsttickethand/line/confirmOrFeedBack',
    method: 'post',
    data: obj
  })
}

export function exportExcel(query){
  return request({
    url: '/stm/swsttickethand/line/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
/**
 * 车票回收信息模板下载
 * @param {*} query 
 * @returns 
 */
 export function templateRecovery(query) {
  return request({
    url: "/stm/swsttickethand/exportTamplateRecovery",
    method: 'get',
    responseType: 'blob',
    params: query
  })
}
/**
 * 车票回收信息导入
 * @param body
 */
 export function ImportRecycle(body) {
  return request({
    url: "/stm/swsttickethand/ImportRecycle",
    headers: { "Content-Type": "multipart/form-data" },
    method: "post",
    data: body
  });
}

export function inputDetailSubmit(ids) {
  return request({
    url: 'subwayst/swtktickethand/inputDetailSubmit',
    method: 'put',
    data: ids
  })
}
export function outputDetailSubmit(ids) {
  return request({
    url: 'subwayst/swtktickethand/outputDetailSubmit',
    method: 'put',
    data: ids
  })
}

/**
 * 驳回-车站
 * @param query
 */
 export function rejectData(query) {
  return request({
    url: '/stm/swsttickethand/rejectData',
    method: 'post',
    params: query
  })
}